
<div id="acl" class="grid_12">

	<h2>ACL</h2>

	<form action="add" method="post" id="Acl">
		<!-- perfil --> 
		<?php foreach($segurancas['Seguranca'] as $seguranca) { ?>
		<fieldset>
			<legend><?php echo $seguranca['seguranca_exibicao'] ?></legend>
			<!-- módulo -->
			<?php foreach($modulos['Modulo'] as $indiceModulo => $modulo) { ?>
			<fieldset>
				<legend><?php echo $modulo['modulo_exibicao'] ?></legend>
					<!-- operações -->
					<?php foreach ($modulo['Operacao'] as $operacao) { ?>
					<label><?php echo $operacao['operacao_exibicao'] ?></label>
					<!-- permissões -->
					<select name="data[Permissao][Seguranca_<?php echo $seguranca['id'] ?>][Modulo_<?php echo $modulo['id'] ?>][Operacao_<?php echo $operacao['id'] ?>]">
						<?php foreach ($permissoes['Permissao'] as $permissao) { ?>
							<option value="<?php echo $permissao['id'] ?>" ><?php echo $permissao['permissao'] ?></option>
						<?php } ?>
					</select>
					<?php } ?>
			</fieldset>
			<?php } ?>
			
		</fieldset>
		<?php } ?>
		<button type="submit">Salvar</button>
	</form>
	
</div>